<@mits.headerDiv />

   <script type='text/javascript' src='${base}/dwr/interface/trackLogMgr.js'></script>
  <script type='text/javascript' src='${base}/dwr/engine.js'></script>
  <script type='text/javascript' src='${base}/dwr/util.js'></script>
<div class="Main" id="Main">
	<!--屏幕切换-->
   
    
    
	<!--左边-->
	<!--右边-->
	<div class="Main_body" id="Main_body">
		<div class="Main_right_top">
		  <div class="Main_bodyListBar_head">搜索条件 </div>
		                 
		 <br>
		 <form method="post" action="" id="myform" name="myform">
		 <input type="hidden" id="carSeizureDto.searchType" name="carSeizureDto.searchType" value="precision">
		 	<table border="0" cellspacing="1" cellpadding="0" class="addTable" >
                <tr >
                 <td >&nbsp;</td>  
                  <td   ><input type="radio" onClick="changeTodayOrHistory()" id="carSeizureDto.todayOrHistory" name="carSeizureDto.todayOrHistory" value="0" checked <#if carSeizureDto?exists && carSeizureDto.todayOrHistory?if_exists == 0>checked</#if>>当日过车信息检索</td>
                   <td >&nbsp;</td>  
                  	<td   ><input type="radio" onClick="changeTodayOrHistory()" id="carSeizureDto.todayOrHistory" name="carSeizureDto.todayOrHistory" value="1" <#if carSeizureDto?exists && carSeizureDto.todayOrHistory?if_exists == 1>checked</#if>>历史过车信息检索</td>
                  	 <td >&nbsp;</td>  
					 <td   ><em>*</em>  对车牌号码精确查询</td>
				</tr>		 	
                <tr>
                    <td >号牌种类：</td>
                  	<td >
					<select width="50" id="carSeizureDto.plateType" name="carSeizureDto.plateType">
					<option value="all">全部</option>		
					<option value="普通小车">普通小车</option>
					<option value="大车">大车</option>
					<option value="警察">警察</option>					
					</select>
					</td>
                    <td >车牌号码：</td>
                  	<td >
                  	<select>
					<option value="浙">浙</option>				
					</select>
					<input type="text"  id="carSeizureDto.plateNumber" size="12" name="carSeizureDto.plateNumber" value="${carSeizureDto?if_exists.plateNumber?if_exists}" dataType="Require"  msg="车牌号码不能为空" />  
					</td>
					 <td >速度范围：</td>
                  	<td >
					<input type="text"  id="carSeizureDto.startSpeed"  size="3" name="carSeizureDto.startSpeed" value="${carSeizureDto?if_exists.startSpeed?if_exists}" dataType="SignlessInteger"  msg="无效数字"/> ~
					<input type="text"  id="carSeizureDto.endSpeed"  size="3" name="carSeizureDto.endSpeed" value="${carSeizureDto?if_exists.endSpeed?if_exists}" dataType="SignlessInteger"  msg="无效数字"/> 
					km/h
					</td>
			   </tr>
                <tr>
                    <td >部门：</td>
                  	<td >
					<select width="50" onChange="changeDept(this.value)" id="carSeizureDto.departmentId" name="carSeizureDto.departmentId">
					<option value="-1">全部</option>	
					<#if allDepartments?exists>
	                <#list allDepartments as department>
	                <option value="${department?if_exists.id?if_exists}" <#if carSeizureDto?exists && carSeizureDto.departmentId?exists><#if carSeizureDto.departmentId == department.id >selected</#if></#if>>${department?if_exists.departmentName?if_exists}</option>
	                </#list>
	                </#if>
					</select>  
					</td>
                    <td >监控点：</td>
                  	<td >
					<select width="50" onChange="changePassPort(this.value)" id="carSeizureDto.passportId" name="carSeizureDto.passportId">
					<option value="all">全部</option>				
					</select>  					
					</td>
					 <td >方向：</td>
                  	<td >
					<select width="50" id="carSeizureDto.direction" name="carSeizureDto.direction">
					<option value="all">全部</option>				
					</select>    
					</td>
			   </tr>
			     <tr>
                    <td >过车时间：</td>
                  	<td colspan="3" >
					 <input type="text" class="input_calendar" readonly onclick="displayCalendar('',$('carSeizureDto.startDate'),'yyyy-mm-dd',this)" name="carSeizureDto.startDate" id="carSeizureDto.startDate" value="<#if  carSeizureDto?exists && carSeizureDto.startDate?exists>${carSeizureDto?if_exists.startDate?if_exists?string("yyyy-MM-dd")}</#if>"/>
					 <select id="carSeizureDto.startHour" name="carSeizureDto.startHour">
					<#list 0..23 as i>　
					<option value="${i}" <#if carSeizureDto?exists && carSeizureDto.startHour?exists && carSeizureDto.startHour?if_exists== i>selected</#if>>${i}</option>
					</#list>				
					</select>时
					<select id="carSeizureDto.startMinute" name="carSeizureDto.startMinute">
					<#list 0..59 as j>　
					<option value="${j}" <#if carSeizureDto?exists && carSeizureDto.startMinute?exists && carSeizureDto.startMinute?if_exists== j>selected</#if>>${j}</option>
					</#list>				
					</select>分
					 ~ 
					<input type="text" class="input_calendar" readonly onclick="displayCalendar('',$('carSeizureDto.endDate'),'yyyy-mm-dd',this)" name="carSeizureDto.endDate" id="carSeizureDto.endDate" value="<#if carSeizureDto?exists && carSeizureDto.endDate?exists>${carSeizureDto?if_exists.endDate?if_exists?string("yyyy-MM-dd")}</#if>"/>
				 <select id="carSeizureDto.endHour" name="carSeizureDto.endHour">
					<#list 0..23 as m>　
					<option value="${m}" <#if carSeizureDto?exists && carSeizureDto.endHour?exists && carSeizureDto.endHour?if_exists== m>selected</#if>>${m}</option>
					</#list>				
					</select>时
					<select id="carSeizureDto.endMinute" name="carSeizureDto.endMinute">
					<#list 0..59 as n>　
					<option value="${n}" <#if carSeizureDto?exists && carSeizureDto.endMinute?exists && carSeizureDto.endMinute?if_exists== n>selected</#if>>${n}</option>
					</#list>				
					</select>分				
					</td>
                     
                  	 
					 <td >&nbsp;</td>  
					 <td >&nbsp;</td>                  
			   </tr>
 				 <tr>
                    <td >车道：</td>
                  	<td >
					<select width="50" id="carSeizureDto.laneName" name="carSeizureDto.laneName">
					<option value="all">全部</option>	
					
					<#list 1..6 as i>　
					<#assign tmp = i>
					<option value="${tmp}" <#if carSeizureDto?exists && carSeizureDto.laneName?exists && carSeizureDto.laneName?if_exists?string ==  tmp?string>selected</#if>>${i}</option>
					</#list>				
					</select>  
					</td>
                    <td >&nbsp;</td>
                  	<td >
					 	&nbsp;
					</td>
					 <td >&nbsp;</td>
                  	<td >
					<input type="button"  value="查询" class="button" onclick="search(0)"/> 
					</td>
			   </tr>		              	   
			 </table >
		</form>		</div>
		<div class="Main_right_line"></div>
		
		  <div class="Main_bodyListBar">
				<div class="Main_bodyListBar_head"><span>过车列表</span> </div>
				
				
	    <div class="Main_bodyListBar_body">
				  <table border="0" cellpadding="0" cellspacing="0" class="listTable">
					<tr align="center">
					  <th  >车牌号码</th>
					  <th  >号牌种类</th>
					  <th  >过车时间</th>
					  <th  >经过地点</th>
					  <th  >车道</th>
					  <th  >速度（km/h）</th>
					  <th  >方向</th>
					  <th  >详情</th>
					</tr>
					<#if result?exists>
                <#assign trackLogs = result.content>
                <#list trackLogs as tracklog>
					<tr onmouseover="listTable_trMouseOver(this)" onmouseout="listTable_trMouseOut(this)">					 					
				      <td>${tracklog?if_exists.plateNumber?if_exists}</td> 
					  <td>${tracklog?if_exists.plateType?if_exists}</td>
					  <td>${tracklog?if_exists.passTime?if_exists}&nbsp;</td>
					  <td>${tracklog?if_exists.passPort?if_exists.passPortName?if_exists}&nbsp;</td>
					  <td>${tracklog?if_exists.laneName?if_exists}&nbsp;</td>
					  <td>${tracklog?if_exists.speed?if_exists}&nbsp;</td>
					  <td>${tracklog?if_exists.direction?if_exists}&nbsp;</td>
					 <td><a href="javascript:onClick=detail('${tracklog?if_exists.passTime?if_exists}','${tracklog?if_exists.passPort?if_exists.passPortName?if_exists}','${tracklog?if_exists.direction?if_exists}')">详情</a></td>
					</tr>
					</#list>
			 <@mpage.fillLine pageSize, result.content.size(), 8/>
                <tr class="foot">
                  <td colspan="8">
                    <#assign page = result.page>
                    <script language = 'JavaScript'>
                        function changePage(cpage){
                           search(cpage);
                        }
                    </script>
                    <@mpage.showPageInfo page/>
                  &nbsp;</td>
                </tr>
                </#if>
				  </table>
			</div>
				<div class="Main_bodyListBar_bottom">
				  <div class="Main_bodyListBar_button">
				  </div>
					
				</div>
			<div class="Main_bodyListBar_foot"></div>
		  </div>
		</div>
	
</div>
 <form method="post" action="" id="form1" name="form1">
 <input type="hidden" name="passTime" id="passTime" />
 <input type="hidden" name="passPortName" id="passPortName" />
 <input type="hidden" name="direction" id="direction" />

 </form>
<script lanague ="javascript">
function changeDept(deptId) {
    var passPort = $('carSeizureDto.passportId');
    var len = passPort.length;
   for(var j= 0;j<len;j++){
    	passPort.selectedIndex = 1;
      	passPort.remove(1);
   }
    var direction = $('carSeizureDto.direction');
    var dlen = direction.length;
   for(var j= 0;j<dlen;j++){
    	direction.selectedIndex = 1;
      	direction.remove(1);
   }   
   direction.selectedIndex = 0;
	trackLogMgr.getPassPortsByDeptId(deptId, fillPassPort);
}

function fillPassPort(data){	
    var passPort = $('carSeizureDto.passportId');
	for(var i=0;i<data.length;i++){
   	 var o = data[i];
       var option = new Option(o.passPortName,o.passPortName,false,false);
      passPort.options[i+1] =option;
    }
    passPort.selectedIndex = 0;
}
function changePassPort(passPortName) {
    var direction = $('carSeizureDto.direction');
    var len = direction.length;
   for(var j= 0;j<len;j++){
    	direction.selectedIndex = 1;
      	direction.remove(1);
   }
    direction.selectedIndex = 0;
   if(passPortName != 'all') 
	trackLogMgr.getDirectionsByPassPortName(passPortName, fillDirection);
}
function fillDirection(data){	
    var direction = $('carSeizureDto.direction');
		for(var i=0;i<data.length;i++){
	   	 var o = data[i];
	       var option = new Option(o,o,false,false);
	      direction.options[i+1] =option;
	    }
}
 function search(cpage) {
 	trimAllElements($('myform'));
    if(Validator.Validate($('myform'),3)){
  		$('myform').action = "${base}/auth/strictfpSeizureList.action?cleanSucMsg=true&currentPage="+cpage;
  		$('myform').submit();
    }		
 }
 function detail(passTime,passPortName,direction) {
    	$('passTime').value = passTime;
    	$('passPortName').value = passPortName;
    	$('direction').value = direction;
  		$('form1').action = "${base}/auth/tracklogTabbar.action?searchLeastRecord=false";
  		$('form1').submit();    		
 }
 function changeTodayOrHistory() {
		 if($('carSeizureDto.todayOrHistory').checked == true) {
		    $('carSeizureDto.startDate').value = new Date().format("yyyy-MM-dd"); 
	    }else {
		    $('carSeizureDto.startDate').value = new Date("january 01 1900 00:01:00").format("yyyy-MM-dd"); 	    
	    }
		    $('carSeizureDto.startHour').selectedIndex = 0;
		    $('carSeizureDto.startMinute').selectedIndex = 0;	    
		  var currentDate = new Date().format("yyyy-MM-dd hh-mm-ss");
		    $('carSeizureDto.endDate').value = new Date().format("yyyy-MM-dd"); 
		    $('carSeizureDto.endHour').selectedIndex = currentDate.substring(11,13);
		    $('carSeizureDto.endMinute').selectedIndex = currentDate.substring(14,16);
 }
</script>
<@mits.footerDiv />


